<?php
declare (strict_types=1);

namespace app\common\validate;

use think\Validate;

class PaymentCertification extends Validate
{
    /**
     * 定义验证规则
     * 格式：'字段名' =>  ['规则1','规则2'...]
     *
     * @var array
     */
    protected $rule = [
        'alipay_name|支付宝姓名'      => 'require|length:2,20',
        'alipay_account|支付宝账号'     => 'require|length:6,20',
        /*'alipay_payment_code|支付宝收款二维码'     => 'require',
        'wechat_payment_code|微信收款二维码'     => 'require',
        'branch|开户行'       => 'require|length:4,30',
        'card_number|银行卡号' => 'require|length:5,30',
        'mobile|银行预留手机号'       => 'require|mobile',*/
    ];

//    protected $scene = [
//        'create' => ['nickname', 'id_card', 'branch', 'card_number', 'mobile'],
//        'edit'   => ['branch', 'card_number', 'mobile'],
//    ];
}
